
from django.conf.urls import url

from . import views

"""
    url()
    
    re_path()
    
    path()
"""

urlpatterns = [
    # url(r'^books/$', views.BooksView.as_view({'get':"list"})),
    # url(r'^books/(?P<pk>\d+)/$', views.BooksView.as_view({'get':'retrieve'})),

    url(r'^heros/$', views.HerosView.as_view()),
    url(r'^heros/(?P<pk>\d+)/$', views.HeroView.as_view()),
]

from rest_framework.routers import DefaultRouter, SimpleRouter

# router = DefaultRouter()
router = SimpleRouter()
router.register('books', views.BooksView)
print(router.urls)
urlpatterns += router.urls
